<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" Culture="Auto" Debug="true" EnableViewState="True" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

 
    protected void searchInput_TextChanged(object sender, EventArgs e)
    {

    }

    protected void DoSearch_Click(object sender, EventArgs e)
    {

    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">
    <title>Search Page</title>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>

<body style="table-layout: auto; padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; overflow: auto; padding-top: 0px; position: static; border-collapse: collapse">
    <form id="form1" runat="server">

    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackErrorMessage="Sorry we made a error somewhere, we are sure however that you have not lost data">
        </asp:ScriptManager>
        <asp:ObjectDataSource ID="SearchResults" runat="server" SelectMethod="Search" 
            TypeName="CombinedSearch" EnableViewState="False" 
            OldValuesParameterFormatString="original_{0}">
            <SelectParameters>
                <asp:ControlParameter ControlID="searchInput" DefaultValue="" Name="searchParameter"
                    PropertyName="Text" Type="String" ConvertEmptyStringToNull="False" />
            </SelectParameters>
        </asp:ObjectDataSource>

        <asp:UpdateProgress ID="UpdateProgress1" runat="server" 
            AssociatedUpdatePanelID="UpdatePanel1">
            <ProgressTemplate>
                <span lang="en-za">Searching....</span>
            </ProgressTemplate>
        </asp:UpdateProgress>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
        <table>
        <tr>
            <td><asp:TextBox ID="searchInput" runat="server" 
                    ontextchanged="searchInput_TextChanged"></asp:TextBox></td>
            <td><asp:Button ID="DoSearch" runat="server" Text="Search" 
                    onclick="DoSearch_Click" /></td>
        </tr>
        <tr>
            <td>
                
                <asp:GridView ID="SearchResultsGrid" runat="server" 
                    DataSourceID="SearchResults" 
                    onrowdatabound="SearchResultsGrid_RowDataBound" 
                    onselectedindexchanged="SearchResultsGrid_SelectedIndexChanged" 
                    >
                
                    <Columns>
                        <asp:CommandField ShowSelectButton="True"  />
                    </Columns>
                
                    <SelectedRowStyle BackColor="#5A7EBF" ForeColor="White" />
                    <HeaderStyle BackColor="#E0E3E8" Font-Names="Tahoma" />
                
                </asp:GridView>
            </td>
        </tr>
        </table>
        </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="searchInput" EventName="TextChanged" />
                <asp:AsyncPostBackTrigger ControlID="DoSearch" EventName="Click" />
                <asp:PostBackTrigger ControlID="SearchResultsGrid" />
            </Triggers>
        </asp:UpdatePanel>
        <br />

    </div>
</form>
</body>
</html>
